package pinpass;

public class PinpassProxy implements pinpass.Pinpass {
  private String _endpoint = null;
  private pinpass.Pinpass pinpass = null;
  
  public PinpassProxy() {
    _initPinpassProxy();
  }
  
  public PinpassProxy(String endpoint) {
    _endpoint = endpoint;
    _initPinpassProxy();
  }
  
  private void _initPinpassProxy() {
    try {
      pinpass = (new pinpass.PinpassServiceLocator()).getPinpass();
      if (pinpass != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)pinpass)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)pinpass)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (pinpass != null)
      ((javax.xml.rpc.Stub)pinpass)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public pinpass.Pinpass getPinpass() {
    if (pinpass == null)
      _initPinpassProxy();
    return pinpass;
  }
  
  public boolean validarCordenada(java.lang.String cordenada) throws java.rmi.RemoteException{
    if (pinpass == null)
      _initPinpassProxy();
    return pinpass.validarCordenada(cordenada);
  }
  
  public java.lang.String cordenada() throws java.rmi.RemoteException{
    if (pinpass == null)
      _initPinpassProxy();
    return pinpass.cordenada();
  }
  
  
}